package com.szty.lib_pen.connectPen

import android.os.Bundle
import android.view.LayoutInflater
import android.view.ViewGroup
import com.bumptech.glide.Glide
import com.sjh.lib_app.baseui.BaseFragment
import com.sjh.lib_app.event.SwitchFragment
import com.szty.lib_pen.R
import kotlinx.android.synthetic.main.sp_fragment_layout_connect_pen_one.*
import org.greenrobot.eventbus.EventBus

/**
 *    author : SunJH
 *    date   : 2021/4/15 0015
 *    desc   : 连接笔的第一页
 */
class ConnectPenStepOne : BaseFragment() {
    override fun onCreatRootView(
        inflater: LayoutInflater,
        container: ViewGroup?,
        savedInstanceState: Bundle?
    ) = R.layout.sp_fragment_layout_connect_pen_one

    override fun onInitView(savedInstanceState: Bundle?) {
        Glide.with(requireContext()).asGif().load(R.drawable.sp_pen_animation).into(img_gif)
        tv_next_step.setOnClickListener {
            EventBus.getDefault().post(SwitchFragment(1))
        }
    }
}